home *** CD-ROM | disk | FTP | other *** search
/ Champak 138 / Volume 138 Aug 19 2011 - Damaged.iso / Games / shadez.swf / scripts / Local / Game / Thing / CShotClusterBombFragment.as < prev    next >
Encoding:
Text File  |  2011-08-19  |  2.7 KB  |  89 lines

  1. package Local.Game.Thing
  2. {
  3.    import Local.Game.World.CAngle;
  4.    import Local.Game.World.CPosition;
  5.    
  6.    public class CShotClusterBombFragment extends CShot
  7.    {
  8.        
  9.       
  10.       private var mDeltaRadians:Number;
  11.       
  12.       private var mFlare:CThingAnimation;
  13.       
  14.       public function CShotClusterBombFragment(param1:CPosition, param2:CPosition)
  15.       {
  16.          if(true)
  17.          {
  18.             super(param1);
  19.             if(true)
  20.             {
  21.                mType = "clusterbombfragment";
  22.                if(true)
  23.                {
  24.                   Process = Process_Normal;
  25.                   if(true)
  26.                   {
  27.                      mAngle = CAngle.AsAngle256(64);
  28.                      if(true)
  29.                      {
  30.                         mDelta = new CPosition();
  31.                         if(true)
  32.                         {
  33.                            mMaxLife = mLife = 1;
  34.                         }
  35.                         mOrientation = 1;
  36.                      }
  37.                      ┬º┬ºpush(┬º┬ºfindproperty(mDelta));
  38.                      ┬º┬ºpush(CPosition);
  39.                      ┬º┬ºpush(param2);
  40.                      ┬º┬ºpush(┬º┬ºfindproperty(CPosition));
  41.                      ┬º┬ºpush(Math.random() * 30 - 15);
  42.                      ┬º┬ºpush(-Math.random());
  43.                      if(true)
  44.                      {
  45.                         ┬º┬ºpush(┬º┬ºpop() * 30 - 15);
  46.                      }
  47.                      ┬º┬ºpop().mDelta = ┬º┬ºpop().ADD(┬º┬ºpop(),new ┬º┬ºpop().CPosition(┬º┬ºpop(),┬º┬ºpop()));
  48.                   }
  49.                   ┬º┬ºpush(┬º┬ºfindproperty(mDeltaRadians));
  50.                   ┬º┬ºpush(Math.random() * 3);
  51.                   if(true)
  52.                   {
  53.                      ┬º┬ºpush(┬º┬ºpop() - 1.5);
  54.                   }
  55.                   ┬º┬ºpop().mDeltaRadians = ┬º┬ºpop();
  56.                }
  57.                mShowOnMap = true;
  58.             }
  59.             AddAnimation("stand",ClusterBomb_Fragment,"AddSprite_Black");
  60.          }
  61.       }
  62.       
  63.       override public function Draw() : void
  64.       {
  65.          if(true)
  66.          {
  67.             super.Draw();
  68.             DrawSprite(GetOrientationMatrix());
  69.          }
  70.       }
  71.       
  72.       public function Process_Normal() : void
  73.       {
  74.          var _loc1_:Number = NaN;
  75.          mDelta.x *= 0.99;
  76.          mDelta.y = mDelta.y * 0.99 + 1;
  77.          mDeltaRadians *= 0.95;
  78.          Move(mDelta);
  79.          mAngle.mAngleRAD += mDeltaRadians;
  80.          _loc1_ = mLandscape.GetAltitude(mPosition.x);
  81.          if(mPosition.y >= _loc1_)
  82.          {
  83.             AddThing(new CEffectExplosionSmall(new CPosition(mPosition.x,_loc1_)));
  84.             DispatchDispose();
  85.          }
  86.       }
  87.    }
  88. }
  89.